package com.woniuxy.happylife.suggest.controller;

import com.woniuxy.happylife.entity.Image;
import com.woniuxy.happylife.entity.ResponseEntity;
import com.woniuxy.happylife.suggest.service.ImageServie;
import org.springframework.beans.factory.annotation.Autowired;



import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Fu
 * @Date 2022-02-17 16:12
 */
@CrossOrigin
@RestController
@RequestMapping("image")
public class ImageController {
    @Autowired
    ImageServie imageServie;
    @RequestMapping("findBySid/{sid}")
    public ResponseEntity findBySid(@PathVariable("sid") Integer sid){
        Image image = imageServie.findBySid(sid);
        return new ResponseEntity(200,"成功",image);
    }

}
